package com.example.utils;
/*
 * @Author: hx
 * @CreateTime: 2021/11/4 16:01
 * @Description: 操作员工具类
 * */

import com.example.config.security.SecurityConfig;
import com.example.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

public class AdminUtils {

    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }

}
